﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using RealEstateBrowser.ViewModels;
using RealEstateBrowser.Views;

namespace RealEstateBrowser
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private MainViewModel mainVM;
        public MainWindow()
        {
            InitializeComponent();
            this.mainVM = new MainViewModel();
            this.DataContext = mainVM;
        }

        private void ButtonDetails_Click(object sender, RoutedEventArgs e)
        {
            DetailsWindow details = new DetailsWindow((sender as Button).DataContext as OfferViewModel);
            details.Show();
        }

        private void ButtonAdvancedSearch_Click(object sender, RoutedEventArgs e)
        {
            AdvancedSearchWindow advancedSearch = new AdvancedSearchWindow(mainVM);
            advancedSearch.Show();
        }
    }
}
